<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title></title>
    <script type="text/javascript" src="./demo/vue.js"></script>
    <link rel="stylesheet" href="./demo/common.css" />
    <link rel="stylesheet" href="./demo/flex.css" />
  </head>
  <body>
    <div id="app">
      <div class="list flex flex-flow">
        <div
          v-for="(item, key) in list"
          :key="key"
          class="item"
          @click="clickItem(item)"
        >
          <div class="name">{{ item.name }}</div>
          <div class="img">
            <img :src="item.img" />
          </div>
        </div>
      </div>
    </div>
    <script type="text/javascript">
      var vm = new Vue({
        el: '#app',
        data() {
          return {
            message: 'xxxx',
            list: [
              {
                name: '加盐',
                html: './src/加盐.html',
                img: './demo/images/加盐.png'
              },
              {
                name: 'Promise中断',
                html: './src/Promise中断.html',
                img: './demo/images/Promise中断.png'
              }
            ]
          }
        },
        methods: {
          clickItem(item) {
            window.open(item.html)
          }
        }
      })
    </script>
  </body>
</html>
